package com.boang.controller;

import com.boang.service.ProService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/*
  @author: 13813
  @date: 2024/8/27 17:09
*/
@RestController
public class ProController {

    @Autowired
    private ProService proService;

    @Value("${server.port}")
    private String serverPort;

    @RequestMapping("/test")
    public String test() {
        return proService.pro() + "," + serverPort;
    }

    @RequestMapping("/test/{name}")
    public String test(@PathVariable("name") String name) {
        return proService.pro() + "," + serverPort + "," + name;
    }
}
